import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';

const DeviceCard = ({ device, onConnect }) => {
  return (
    <View style={styles.card}>
      <Text>{device.name}</Text>
      <Text>{device.type}</Text>
      <TouchableOpacity onPress={onConnect}>
        <Text>连接</Text>
      </TouchableOpacity>
    </View>
  );
};

export default DeviceCard;